<script_basic> : Basic Script (Embedded)

Encloses ôBasic Scriptö script within a macro.  It is possible to exchange data between the program native macro language variables and the Basic Script variables.  The variable content exchange is done through DDE - see the samples below.

Syntax: 

<script_basic> A script source code goes hereà</script_basic>

Examples: 

1. This macro sample counts Sin(1) and displays it in Notepad:

<#> Count sin(1), put it to clipboard and show it in Notepad
<#>
<cmds>
<script_basic>
Sub Main
s = Sin(1)
Clipboard s
End Sub
</script_basic>
<execappex>("notepad.exe","","",0,0)
<waitfor>("WIN","OPEN","Notepad",5,0)
<keys><ctrl>v<ctrl>


2. This macro sample shows how to retrieve value of _vCurrDate_DDMMYYYY native macro language system variable and save it in Basic Script variable:

<cmds>|
<script_basic>

Sub Main
    ChanNum = DDEInitiate("MacroEngine","MacroGetVar")
    Var$ = DDERequest$(ChanNum,"_vCurrDate_DDMMYYYY")
    DDETerminate ChanNum
            MsgBox Var
End Sub
</script_basic>
 

3. This macro sample shows how to send data from basic script code to native macro:

<cmds>
<script_basic>

Sub Main
    ChanNum = DDEInitiate("MacroEngine","MacroSetVar")
             Var = "vVar=Hello from Basic script!"
    DDEExecute (ChanNum, Var)
    DDETerminate ChanNum
End Sub

</script_basic>
<msg>(-100,-100,"vVar","Data Retrieved From Basic Script",1)